InsertRange Method (Int32, IEnumerable)

Wintellect PowerCollections

Collapse imageExpand ImageCollapseAll imageExpandAll imageDropDown imageDropDownHover imageCopy imageCopyHover image
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Inserts a collection of items at the given index in the BigList. All items at indexes equal to or greater than index increase their indices by the number of items inserted.

Namespace: Wintellect.PowerCollections
Assembly:  PowerCollections (in PowerCollections.dll)

Syntax

C#
public void InsertRange(
	int index,
	IEnumerable<T> collection
)
Visual Basic (Declaration)
Public Sub InsertRange ( _
	index As Integer, _
	collection As IEnumerable(Of T) _
)
Visual C++
public:
void InsertRange (
	int index, 
	IEnumerable<T>^ collection
)

Parameters

index
Int32
The index to insert the collection at. After the insertion, the first item of the inserted collection is located at this index. The first item has index 0.
collection
IEnumerable<(Of <T>)>
The collection of items to insert at the given index.

Remarks

The amount of time to insert an arbitrary collection in the BigList is O(M + log N), where M is the number of items inserted, and N is the number of items in the list.

Exceptions

ExceptionCondition
System..::ArgumentOutOfRangeExceptionindex is less than zero or greater than Count.
System..::ArgumentNullExceptioncollection is null.

See Also